<?php /* PROJECTS $Id: do_project_aed.php,v 1.11.10.4 2006/07/25 20:24:13 merlinyoda Exp $ */
$projectsArr = dPgetParam( $_POST, 'checkArchive', array());
require_once($AppUI->getModuleClass('projects'));
$obj = new CProject();
?>
<table cellspacing="0" cellpadding="3" border="0" width="100%" class="infopanel">
<tr>
	<td><?=$AppUI->_('Results of references archive')?></td>
</tr>
</table>
<table id="idReferenceList" class="list" cellspacing="0" cellpadding="2" border="0" width="100%">
<tr>
	<th><?=$AppUI->_('Reference')?></td>
	<th><?=$AppUI->_('Result')?></td>
</tr>
<?php
$i = 0;
foreach($projectsArr as $project_id) {
	$class= $i % 2 == 0 ? "second" : "first";
	$i++;
	echo "<tr class='$class'>";
	if ($obj->load($project_id) === false) {
		echo "<td> $project_id </td><td>".$AppUI->_('Failed to load project with id: ') . $project_id . "</td>";
		echo "</tr>";
		continue;
	}
	$msg = $obj->doArchive();
	echo "<td> {$obj->project_name}</td><td>". $msg. "</td>";
	echo "</tr>";
}
?>
<tr>
	<th colspan="100%"><input type="button" name="back" value="<?=$AppUI->_('Back')?>" onclick="go('?<?=$AppUI->getPlace()?>')"/></th>
</tr>
</table>